Repository navigation
Conversation
The committee approval endpoint took the receiver group from the request body, so an API client could send the request to any group. That group could then accept it and get an approval report number. * views: ignore any client-provided receiver_group and use the referee group of the record community's enrollment. Return a 400 with a clear message when the community is not enrolled, instead of a bare 403. * submit action: refuse a request whose receiver is not the enrollment's referee group, which also covers callers that create the request through the service directly. * tests: cover a request sent to another group. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ecord Creating the public record copied the CDS report numbers (cdsrn) of the restricted record into its identifiers. Report numbers are unique per record, so publishing failed with "The CDS report number ... is already taken" for every paper that carries its own report number. The public record now leaves cdsrn out of its identifiers and gets each one as a related identifier (scheme cdsrn, relation isvariantformof), the same shape the INSPIRE harvester writes and matches on. The restricted record keeps the report numbers. Co-Authored-By: Claude Opus 5.5 <[email protected]>
zzacharo
force-pushed
the
fix-cdsrn-on-publish-public
branch
from
November 18, 2026 16:09
1da8654 to
85185d9
Compare
zzacharo
marked this pull request as ready for review
November 18, 2026 16:09
liptakpanna
reviewed
Nov 18, 2026
|
|
||
| # Only the enrollment's referee group may receive (and so accept) the | ||
| # request, whatever receiver the caller passed. | ||
| if self.request.receiver.reference_dict != {"group": enrollment.referee_group}: |
Contributor
There was a problem hiding this comment.
if user provided receiver_group is popped in views.py is this even a possibility?
| # The receiver always comes from the community's enrollment. A | ||
| # client-provided ``receiver_group`` is ignored so that callers cannot | ||
| # route the request (and its accept action) to a group of their choice. | ||
| body.pop("receiver_group", None) |
Contributor
There was a problem hiding this comment.
isn't the request body validated against a schema where the existence of this field could raise a validation error?
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Committee approval: referee group from the enrollment, report numbers on public records
Two fixes found while testing the EP approval API on the sandbox for the experiments' integration guide.
1. Approval requests always go to the enrollment's referee group
POST /api/records/<id>/committee-approvaltookreceiver_groupfrom the request body. A community manager could send the request to any group. That group could then accept it and get a real CERN-EP report number. On the sandbox, a request sent to a group of my choice was accepted and received CERN-EP-2026-218.receiver_groupand uses thereferee_groupof the community's enrollment.CommitteeApprovalSubmitActionrefuses a request whose receiver is not the referee group. This covers code that creates the request through the service directly.test_committee_approval_submit_rejects_other_receiver_group.2. publish-public keeps report numbers as related identifiers
POST /api/records/<id>/committee-approval/publish-publiccopied the restricted record'scdsrnidentifiers into the new public record. CDS report numbers are unique per record, so publishing failed with "The CDS report number '…' is already taken." No paper with its own report number (LHCb-PAPER-…, ATLAS-…) could get its public record.cdsrninidentifiers. Each one is added torelated_identifiersas{"scheme": "cdsrn", "relation_type": {"id": "isvariantformof"}}, with the resource type. This is the shape the INSPIRE harvester writes andRelatedReportNumberMatchFiltermatches on.Changes for API clients
receiver_groupin the committee approval body is ignored. The frontend still sends it, which is harmless.